package com.netty.demo;

import com.netty.demo.server.DiscardServer;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.annotation.Resource;

@SpringBootApplication
@EnableScheduling
public class NettyDemoApplication implements CommandLineRunner {

	@Resource
	private DiscardServer discardServer;

	public static void main(String[] args) {
		SpringApplication.run(NettyDemoApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		discardServer.run(8080);
	}

}
